
class Submittion
  
  attr_accessor :problem_id, :compiler_id, :team_id, :text
  
  def attributes=(attrs)
    attrs.each do |key, value|
      self.send(:"#{key}=", value)
    end
  end
  
  def problem
    @problem ||= Problem.find(@problem_id)
  end
  
  def problem_id=(v)
    @problem_id = v
    @problem = nil
  end
  
end
